package com.example.demo.client.vm.cssmqry.group;

import com.ffcs.oss.common.utils.tree.TreeFormat;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**listChildrenGroupTree
 * @Author linqinghai
 * @Date：2020/3/5
 */
public class GroupVm implements TreeFormat<GroupVm, Long>, Serializable {
    private static final long serialVersionUID = 2953353482190451874L;
    @ApiModelProperty("ID")
    private Long id;
    @ApiModelProperty("用户组名称")
    private String groupName;
    @ApiModelProperty("父用户组ID")
    private Long parentId;
    @ApiModelProperty("父用户组名称")
    private String parentName;
    @ApiModelProperty("用户组类型")
    private Integer groupType;
    @ApiModelProperty("用户组类型描述")
    private String groupTypeDesc;
    @ApiModelProperty("用户组全称")
    private String groupFullName;
    @ApiModelProperty("用户组全ID")
    private String fullGroupId;
    @ApiModelProperty("状态")
    private Integer status;
    @ApiModelProperty("描述")
    private String description;
    @ApiModelProperty("所属区域ID")
    private Long regionId;
    @ApiModelProperty("所属区域名称")
    private String regionName;
    @ApiModelProperty("用户组标识")
    private String groupFlag;
    @ApiModelProperty("创建人")
    private String createName;
    @ApiModelProperty("创建时间")
    private Date createTime;
    @ApiModelProperty("修改人")
    private String updateName;
    @ApiModelProperty("修改时间")
    private Date updateTime;
    @ApiModelProperty("子元素")
    List<GroupVm> children;

    @Override
    public String toString() {
        return "GroupVm{" +
            "id=" + id +
            ", groupName='" + groupName + '\'' +
            ", parentId=" + parentId +
            ", parentName='" + parentName + '\'' +
            ", groupType=" + groupType +
            ", groupTypeDesc='" + groupTypeDesc + '\'' +
            ", groupFullName='" + groupFullName + '\'' +
            ", fullGroupId='" + fullGroupId + '\'' +
            ", status=" + status +
            ", description='" + description + '\'' +
            ", regionId=" + regionId +
            ", regionName='" + regionName + '\'' +
            ", groupFlag='" + groupFlag + '\'' +
            ", createName='" + createName + '\'' +
            ", createTime=" + createTime +
            ", updateName='" + updateName + '\'' +
            ", updateTime=" + updateTime +
            ", children=" + children +
            '}';
    }

    public String getRegionName() {
        return regionName;
    }

    public void setRegionName(String regionName) {
        this.regionName = regionName;
    }

    public String getGroupTypeDesc() {
        return groupTypeDesc;
    }

    public void setGroupTypeDesc(String groupTypeDesc) {
        this.groupTypeDesc = groupTypeDesc;
    }

    public String getFullGroupId() {
        return fullGroupId;
    }

    public void setFullGroupId(String fullGroupId) {
        this.fullGroupId = fullGroupId;
    }

    public String getGroupFlag() {
        return groupFlag;
    }

    public void setGroupFlag(String groupFlag) {
        this.groupFlag = groupFlag;
    }

    public String getCreateName() {
        return createName;
    }

    public void setCreateName(String createName) {
        this.createName = createName;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getUpdateName() {
        return updateName;
    }

    public void setUpdateName(String updateName) {
        this.updateName = updateName;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getGroupName() {
        return groupName;
    }

    public void setGroupName(String groupName) {
        this.groupName = groupName;
    }

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public String getParentName() {
        return parentName;
    }

    public void setParentName(String parentName) {
        this.parentName = parentName;
    }

    public Integer getGroupType() {
        return groupType;
    }

    public void setGroupType(Integer groupType) {
        this.groupType = groupType;
    }

    public String getGroupFullName() {
        return groupFullName;
    }

    public void setGroupFullName(String groupFullName) {
        this.groupFullName = groupFullName;
    }


    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }


    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Long getRegionId() {
        return regionId;
    }

    public void setRegionId(Long regionId) {
        this.regionId = regionId;
    }


    public List<GroupVm> getChildren() {
        return children;
    }

    public void setChildren(List<GroupVm> children) {
        this.children = children;
    }

    @Override
    public Long getTreeFormatId() {
        return this.id;
    }

    @Override
    public Long getParentTreeFormatId() {
        return this.parentId;
    }

    @Override
    public void addChildren(GroupVm child) {
        if (this.children == null) {
            this.children = new ArrayList<>();
        }
        this.children.add(child);
    }
}
